-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
src: support import() and import.meta in embedder-run modules #61654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This adds a embedder_module_hdo for identifying embedder-run modules in the dynamic import handler and import.meta initializer, and a SourceTextModuleTypes for customizing source text module compilation in the JS land via compileSourceTextModule(). Also, refactors the existing embedder module compilation code to reuse the builtin resolution logic.
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61654 +/- ##
==========================================
+ Coverage 89.74% 89.76% +0.01%
==========================================
Files 674 674
Lines 204348 204495 +147
Branches 39271 39294 +23
==========================================
+ Hits 183396 183564 +168
+ Misses 13262 13215 -47
- Partials 7690 7716 +26
🚀 New features to boost your workflow:
|
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Aditi-1400
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a rejection test for non-builtin imports? 🤔
548d620 to
5182318
Compare
|
Added tests for rejections from dynamic import(). PTAL, thanks @legendecas @Aditi-1400 |
|
Landed in 911b158 |
This adds a embedder_module_hdo for identifying embedder-run modules in the dynamic import handler and import.meta initializer, and a SourceTextModuleTypes for customizing source text module compilation in the JS land via compileSourceTextModule(). Also, refactors the existing embedder module compilation code to reuse the builtin resolution logic.